<!DOCTYPE html>
<html>
<head>
    <title></title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="2">
                    <i-input v-model="q.userPhone" @on-enter="query" placeholder="手机号"/>
                </i-col>
                <i-col span="3">
                    <i-input v-model="q.orderno" @on-enter="query" placeholder="订单号"/>
                </i-col>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("income:info"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;查看</i-button>
                #end
                #if($shiro.hasPermission("income:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("income:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("income:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>

		<i-form ref="formValidate" :model="income" :rules="ruleValidate" :label-width="100">
            <Form-item label="用户id" prop="userid">
                <i-input v-model="income.userid" placeholder="用户id"/>
            </Form-item>
            <Form-item label="用户名" prop="userName">
                <i-input v-model="income.userName" placeholder="用户名"/>
            </Form-item>
            <Form-item label="用户手机号" prop="userPhone">
                <i-input v-model="income.userPhone" placeholder="用户手机号"/>
            </Form-item>
            <Form-item label="订单编号" prop="orderno">
                <i-input v-model="income.orderno" placeholder="订单编号"/>
            </Form-item>
            <Form-item label="订单金额" prop="ordermoney">
                <i-input v-model="income.ordermoney" placeholder="订单金额"/>
            </Form-item>
            <Form-item label="我的收益" prop="mymoney">
                <i-input v-model="income.mymoney" placeholder="我的收益"/>
            </Form-item>
            <Form-item label="消费者编号" prop="consumUid">
                <i-input v-model="income.consumUid" placeholder="消费者编号"/>
            </Form-item>
            <Form-item label="消费者名" prop="consumName">
                <i-input v-model="income.consumName" placeholder="消费者名"/>
            </Form-item>
            <Form-item label="消费者手机" prop="consumPhone">
                <i-input v-model="income.consumPhone" placeholder="消费者名"/>
            </Form-item>
            <Form-item label="订单状态" prop="status">
                <Radio-group v-model="income.status">
                    <Radio label="0">
                        <span>无效</span>
                    </Radio>
                    <Radio label="1">
                        <span>有效</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="收益类型" prop="type">
                <Radio-group v-model="income.type">
                    <Radio label="1">
                        <span>Done奖励</span>
                    </Radio>
                    <Radio label="2">
                        <span>售出产品</span>
                    </Radio>
                    <Radio label="3">
                        <span>购买兑换产品</span>
                    </Radio>
                    <Radio label="4">
                        <span>用户转出</span>
                    </Radio>
                    <Radio label="5">
                        <span>用户转入</span>
                    </Radio>
                    <Radio label="6">
                        <span>推荐奖励</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="比率" prop="rate">
                <i-input v-model="income.rate" placeholder="返金额百分比"/>
            </Form-item>
            <Form-item label="备注" prop="consumPicurl">
                <i-input v-model="income.consumPicurl" placeholder="备注或其他"/>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
	</Card>
</div>

<script src="${rc.contextPath}/js/income/income.js?_${date.systemTime}"></script>
</body>
</html>